//
//  LJP_SearchHeader.m
//  God_is_a_Girl
//
//  Created by 李继鹏 on 15/9/28.
//  Copyright (c) 2015年 呸. All rights reserved.
//

#import "LJP_SearchHeader.h"

@implementation LJP_SearchHeader

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.searchBar = [[UISearchBar alloc] initWithFrame:CGRectMake(20, 27, [UIScreen mainScreen].bounds.size.width - 105, 30)];
        self.searchBar.placeholder = @"请输入关键词";
        self.cancle = [UIButton buttonWithType:UIButtonTypeCustom];
        self.cancle.frame = CGRectMake([UIScreen mainScreen].bounds.size.width - 80, 27, 60, 30);
        [self.cancle setTitle:@"取消" forState:UIControlStateNormal];
        [self.cancle setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
        [self addSubview:_cancle];
        [self addSubview:_searchBar];
    }
    return self;
}

@end
